package Gather.GatherExercise;

import java.util.ArrayList;

/**
 * ClassName:StudentText
 * Package:Gather.GatherExercise
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/18-0:25
 * @Version:v1.0
 */
public class StudentText001 {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        Student s1 = new Student("zhangSan", 24);
        Student s2 = new Student("lisi", 24);
        Student s3 = new Student("wangWu", 24);
        list.add(s1);
        list.add(s2);
        list.add(s3);

        for (int i = 0; i < list.size(); i++) {
           Student stu=list.get(i);
            System.out.println(stu.getName()+","+stu.getAge());
        }
    }
}
